package com.yyk.yykywd.mvvm.ui.fragment

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import com.yyk.yykywd.ID
import com.yyk.yykywd.R
import com.yyk.yykywd.base.NewBaseFragment
import com.yyk.yykywd.databinding.FragmentAgentSiteBinding
import com.yyk.yykywd.databinding.FragmentProxySiteBinding
import com.yyk.yykywd.getFragmentViewModel
import com.yyk.yykywd.mvvm.view_model.AgentBasicInfoViewModel
import com.yyk.yykywd.mvvm.view_model.AgentSiteViewModel

/**
 * 代理站点信息
 */
class AgentSiteFragment : NewBaseFragment() {

    private val viewModel by lazy {
        getFragmentViewModel(this, AgentSiteViewModel::class.java)
    }

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val binding: FragmentProxySiteBinding = DataBindingUtil.inflate(inflater,
                R.layout.fragment_proxy_site,
                container,
                false)
        binding.viewModel = viewModel
        binding.lifecycleOwner = this
        return binding.root
    }

    override fun initView() {
    }

    companion object {
        fun newInstance(id: Int): AgentSiteFragment {
            val args = Bundle()
            args.putInt(ID, id)
            val fragment = AgentSiteFragment()
            fragment.arguments = args
            return fragment
        }
    }
}